﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace IndexMarkSilverlightClient.Classes
{
    public partial class CMessage : UserControl
    {
        static readonly List<CMessage> Box = new List<CMessage>();

        public static void Show(string text)
        {
            foreach (var item in Box)
            {
                item.tb.Text = text;
                item.Visibility = Visibility.Visible;
            }
        }

        public static void Hide()
        {
            foreach (var item in Box)
            {
                item.Visibility = Visibility.Collapsed;
            }
        }

        public CMessage()
        {
            InitializeComponent();
            Box.Add(this);
            Visibility = Visibility.Collapsed;
        }
    }
}